<template>
  <a-modal
    v-model:open="forgetVisible"
    :dialogStyle="{ padding: 0 }"
    :width="400"
    :height="200"
    :closeBtn="false"
    :footer="false"
    :title="false"
  >
    <div class="dialog-header">操作提示</div>
    <div class="dialog-main">
      <div class="dialog-content">{{ forgetText }}</div>
    </div>
    <div class="dialog-footer">
      <div class="dialog-btn" @click="handleHideForget">知道了</div>
    </div>
  </a-modal>
</template>
<script setup>
import { ref, computed } from "vue";
const props = defineProps({
  value: Boolean,
  modelValue: Boolean,
});
const emit = defineEmits(["update:value"]);

const forgetVisible = computed({
  get() {
    return props.value || props.modelValue;
  },
  set(val) {
    emit("update:value", val);
  },
});
const handleHideForget = () => {

  forgetVisible.value = false;
  emit("update:modelValue", forgetVisible.value);
};
const forgetText = ref("请联系教师或者管理员获取新密码");
</script>
<style scoped lang="less">

.dialog-header {
  text-align: center;
  padding-bottom: 16px;
  font-family: PingFangSC-Medium;
  font-weight: 500;
  font-size: 18px;
  color: #262626;
}
.dialog-main {
  height: 80px;
  padding-top: 22px;
  box-sizing: border-box;
  .dialog-content {
    text-align: center;
    font-family: PingFangSC-Regular;
    font-weight: 400;
    font-size: 16px;
    color: #262626;
  }
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  .dialog-btn {
    width: 100px;
    height: 40px;
    background: #2776ff;
    border-radius: 8px;
    font-family: PingFangSC-Regular;
    font-weight: 400;
    font-size: 14px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
}
</style>